/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Entity;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author Acer
 */
@Entity
@Table(name = "tb_Cars", catalog = "East2West_TourAndTravel", schema = "dbo")
@NamedQueries({
    @NamedQuery(name = "TbCars.findAll", query = "SELECT t FROM TbCars t"),
    @NamedQuery(name = "TbCars.findByCarID", query = "SELECT t FROM TbCars t WHERE t.carID = :carID"),
    @NamedQuery(name = "TbCars.findByCarName", query = "SELECT t FROM TbCars t WHERE t.carName = :carName"),
    @NamedQuery(name = "TbCars.findByCarModel", query = "SELECT t FROM TbCars t WHERE t.carModel = :carModel"),
    @NamedQuery(name = "TbCars.findByCarType", query = "SELECT t FROM TbCars t WHERE t.carType = :carType"),
    @NamedQuery(name = "TbCars.findByCarSeating", query = "SELECT t FROM TbCars t WHERE t.carSeating = :carSeating"),
    @NamedQuery(name = "TbCars.findByCarDriver", query = "SELECT t FROM TbCars t WHERE t.carDriver = :carDriver"),
    @NamedQuery(name = "TbCars.findByCarConditione", query = "SELECT t FROM TbCars t WHERE t.carConditione = :carConditione"),
    @NamedQuery(name = "TbCars.findByCarPrice", query = "SELECT t FROM TbCars t WHERE t.carPrice = :carPrice"),
    @NamedQuery(name = "TbCars.findByDiscount", query = "SELECT t FROM TbCars t WHERE t.discount = :discount"),
    @NamedQuery(name = "TbCars.findByDeleteSTT", query = "SELECT t FROM TbCars t WHERE t.deleteSTT = :deleteSTT"),
    @NamedQuery(name = "TbCars.findByCatID", query = "SELECT t FROM TbCars t WHERE t.catID = :catID")})
public class TbCars implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "car_ID", nullable = false)
    private Integer carID;
    @Column(name = "car_Name", length = 50)
    private String carName;
    @Column(name = "car_Model", length = 50)
    private String carModel;
    @Column(name = "car_Type", length = 50)
    private String carType;
    @Column(name = "car_Seating")
    private Integer carSeating;
    @Column(name = "car_Driver")
    private Integer carDriver;
    @Column(name = "car_Conditione")
    private Integer carConditione;
    @Column(name = "car_Price", precision = 53)
    private Double carPrice;
    @Column(name = "discount", precision = 53)
    private Double discount;
    @Column(name = "deleteSTT")
    private Integer deleteSTT;
    @Column(name = "cat_ID")
    private Integer catID;
    @OneToMany(mappedBy = "carID")
    private List<TbOrder> tbOrderList;

    public TbCars() {
    }

    public TbCars(Integer carID) {
        this.carID = carID;
    }

    public Integer getCarID() {
        return carID;
    }

    public void setCarID(Integer carID) {
        this.carID = carID;
    }

    public String getCarName() {
        return carName;
    }

    public void setCarName(String carName) {
        this.carName = carName;
    }

    public String getCarModel() {
        return carModel;
    }

    public void setCarModel(String carModel) {
        this.carModel = carModel;
    }

    public String getCarType() {
        return carType;
    }

    public void setCarType(String carType) {
        this.carType = carType;
    }

    public Integer getCarSeating() {
        return carSeating;
    }

    public void setCarSeating(Integer carSeating) {
        this.carSeating = carSeating;
    }

    public Integer getCarDriver() {
        return carDriver;
    }

    public void setCarDriver(Integer carDriver) {
        this.carDriver = carDriver;
    }

    public Integer getCarConditione() {
        return carConditione;
    }

    public void setCarConditione(Integer carConditione) {
        this.carConditione = carConditione;
    }

    public Double getCarPrice() {
        return carPrice;
    }

    public void setCarPrice(Double carPrice) {
        this.carPrice = carPrice;
    }

    public Double getDiscount() {
        return discount;
    }

    public void setDiscount(Double discount) {
        this.discount = discount;
    }

    public Integer getDeleteSTT() {
        return deleteSTT;
    }

    public void setDeleteSTT(Integer deleteSTT) {
        this.deleteSTT = deleteSTT;
    }

    public Integer getCatID() {
        return catID;
    }

    public void setCatID(Integer catID) {
        this.catID = catID;
    }

    public List<TbOrder> getTbOrderList() {
        return tbOrderList;
    }

    public void setTbOrderList(List<TbOrder> tbOrderList) {
        this.tbOrderList = tbOrderList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (carID != null ? carID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TbCars)) {
            return false;
        }
        TbCars other = (TbCars) object;
        if ((this.carID == null && other.carID != null) || (this.carID != null && !this.carID.equals(other.carID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entity.TbCars[carID=" + carID + "]";
    }

}
